Android application class
アプリ全体でのライフサイクルを持つオブジェクト(1つだけ?のインスタンス)を生成する。
ここで、プロパティを設定しておけば、便利?なグローバルオブジェクトを使える?(気をつける点はあるかも)
例がある
まだ、細かい点は理解できてないが、、
document:
life cycleの説明
activity, application, それぞれ、contextクラスのインスタンスとして登場する。
使い分けで、、いろいろ議論があるけど、あまり気にしなくてよい?
実用的には、applicationContextのほうが、堅実。unless dialog, toast以外。
appには、1つのaplicationContextとなる(保証はない?)ので???
I would say use the app context unless you have good reason not too (i.e. for dialogs or toasts). It's quite easy to run into memory leaks using activity contexts in different situations so best to be safe